<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
          console.log(window.a);
     function wins(){
     
        if(a in window){//in 检测当前对象是否包含这个属性 返回boolean
            var a = 10;
        }
        console.log(a); 
    }
      wins();
    var ary=[1];
    ary.mypush(2);

    </script>
</body>
</html>

